package com.oxygen.design.interpreter.interfaces.impl;

import com.oxygen.design.interpreter.interfaces.Expression;

/**
 * @author wangjie
 * @title: TerminalExpression
 * @description: TODO
 * @date 2022/3/30 21:36
 **/
public class TerminalExpression implements Expression {

    private String data;

    public TerminalExpression(String data) {
        this.data = data;
    }

    @Override
    public boolean interpret(String context) {
        if (context.contains(data)) {
            return true;
        }
        return false;
    }

}
